package API.DAY6.io;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class PwDemo {
    public static void main(String[] args) throws FileNotFoundException {
//        PrintWriter pw = new PrintWriter("osw.txt");
        FileOutputStream fos = new FileOutputStream("osw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        BufferedWriter bw = new BufferedWriter(osw);
        PrintWriter pw = new PrintWriter(bw);
        pw.println("你好");
        pw.println("世界");
        System.out.println("写入完毕");
        pw.close();
    }
}
